1. Field of the Invention
The present invention relates to an image processing technique for tone transformation of an image.
2. Description of the Related Art
Conventionally, a technique of applying tone transformation such as gamma transformation to RGB components or luminance components of image data has been known.
For example, in Japanese Unexamined Patent Application Publication No. Hei 4-150171, the procedure for the tone transformation is described as follows. First, a luminance component Y(=0.3·R+0.59·G+0.11·B) is substituted in a predetermined gamma transformation characteristic f to find a luminance signal Y′=f(Y) after the transformation. A transformation gain K(Y)=f(Y)/Y at this time is found and each of RGB components is multiplied by the transformation gain.R′=K(Y)·R, G′=K(Y)·G, B′=K(Y)·B
Such processing can prevent a change in hue after the tone transformation since a RGB ratio after the tone transformation matches a RGB ratio before the transformation.
However, controlling the transformation gain K by the luminance component Y as described above inevitably causes a problem of color saturation.
For example, assuming a color gamut of 0≦R, G, B≦1, Y falls in a range of 0≦Y≦1. Here, in a part where red is strong in an image, for example, in a pixel of (R, G, B)=(0.8, 0.1, 0.1), the luminance component is Y=0.31. If the transformation gain K is determined based on this luminance component Y, there is a possibility that the maximum transformation gain K becomes 1/0.31=3.22 times.
Meanwhile, a gain allowance of a R component is only 1/0.8=1.25. Therefore, when the transformation gain K is determined based on the luminance component Y, the color saturation of the R component is liable to occur. This is also true to a B component. Generally, the color saturation is more liable to occur in a color component less contributing to the luminance component.
The specification of U.S. Pat. No. 6,677,959 discloses a method in which the maximum values of R, G, and B, that is, max (R, G, B) are found, and a correction coefficient is determined so that the maximum values do not exceed a dynamic range, and R, G, and B are multiplied by this correction coefficient, thereby finding R′, G′, and B′ after the transformation. This method can prevent the color saturation of red and blue.
However, the U.S. Pat. No. 6,677,959 does not teach the optimum processing method in a luminance/color difference space (such as a YCrCb space), though teaching the tone transformation in a R, G, B color space.